// 状态过滤器
let statusFilter = (val) => {
  if (val === 0) {
    return "正式";
  } else if (val === 1) {
    return "转中心";
  } else if (val === 2) {
    return "休学";
  } else if (val === 3) {
    return "脱产";
  } else if (val === 4) {
    return "结课";
  } else {
    return "退费";
  }
};

// 职位过滤器
let postionFilter = (val) => {
  if (val == 0) {
    return "班主任";
  } else if (val == 1) {
    return "项目经理";
  } else if (val == 2) {
    return "管理员";
  } else {
    return "没有职位"
  }
}

// 登录日期过滤器
let timeFilter = (val) => {
  if (val == 0) {
    return "该用户没登录过";
  } else {
    val *= 1 // 字符串转数字
    var d = new Date(val);
    var year = d.getFullYear();
    var month = d.getMonth() + 1;
    var day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate();
    var hour = d.getHours();
    var minutes = d.getMinutes();
    var seconds = d.getSeconds();
    return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds;
  }
}

// 学历过滤器
let educationFilter = (val) => {
  if (val == 0) {
    return "大专"
  } else if (val == 1) {
    return "本科"
  } else if (val == 2) {
    return "高中/中专"
  } else if (val == 3) {
    return "研究生"
  } else {
    return "没有学历"
  }
}

// 学习目的过滤器
let objectiveFilter = (val) => {
  if (val == 0) {
    return "充电提升"
  } else if (val == 1) {
    return "转行"
  } else {
    return "没有目的"
  }
}

export { statusFilter, postionFilter, timeFilter, educationFilter, objectiveFilter }